package game.cube;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.WindowManager;

public class Cube_Game_01_Activity extends Activity {
	private GLSurfaceView mGLSurfaceView;
	private GL_Renderer mGLRenderer;

	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		mGLSurfaceView = new GLSurfaceView(this);
		setContentView(mGLSurfaceView);
		WindowManager windowmanager = (WindowManager)getSystemService(WINDOW_SERVICE);
		mGLRenderer = new GL_Renderer(this, windowmanager.getDefaultDisplay().getWidth(), windowmanager.getDefaultDisplay().getHeight());
		mGLSurfaceView.setEGLContextClientVersion(2);
		mGLSurfaceView.setRenderer(mGLRenderer);
	}

	/**
	 *
	 */
	public void onPause() {
		mGLSurfaceView.onPause();
		super.onPause();
	}

	/**
	 *
	 */
	public void onResume() {
		super.onResume();
		mGLSurfaceView.onResume();
	}
}